package com.lagou.service;

import com.lagou.dao.UserDao;
import com.lagou.entity.User;
import com.lagou.factory.DaoFactory;

public class UserServiceImpl implements UserService{
    /**
     * 自定义成员变量记录用户数据访问对象
     */
    private UserDao userDao;

    /**
     * 自定义构造方法实现成员变量的初始化
     */
    public UserServiceImpl(){ this.userDao = DaoFactory.getUserDao();}

    /**
     * 自定义成员方法实现根据参数指定的user对象来调用DAO层实现登录功能
     */
    public User userLoginService(User user){
        return userDao.userLogin(user);
    }
}
